import request from '@/utils/request'

// 获取售货机信息
export const salesInfo = params => request({
  url: '/api/vm-service/vm/search',
  params
})

// 搜索售货机信息
export const searchSalesInfo = params => request({
  url: '/api/vm-service/vm/search',
  params
})

// 获取售货机类型
export const getSalesDetail = params => request({
  url: '/api/vm-service/vmType/search',
  params
})

// 提交新建售货机信息
export const addVendingMachineInfo = data => request({
  url: '/api/vm-service/vm',
  method: 'POST',
  data
})

// 获取折扣信息
export const getDiscountInfo = () => request({
  url: '/api/vm-service/policy'
})

// 修改折扣信息
export const putDiscountInfo = data => request({
  url: '/api/vm-service/vm/applyPolicy',
  method: 'PUT',
  data
})

// 获取货到设置信息
export const getCargoAisleInfo = id => request({
  url: `/api/vm-service/vmType/${id}`
})

// 获取售货机详情
export const getVendingMachineInfo = id => request({
  url: `/api/vm-service/channel/channelList/${id}`
})
